# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua

pkgname=tomcat-native
pkgver=1.1.27
pkgrel=1
pkgdesc='The Apache Tomcat Native Library'
arch=('i686' 'x86_64')
url='http://tomcat.apache.org/'
license=('APACHE')
depends=('apr' 'openssl')
makedepends=('java-environment')
options=(!emptydirs)
source=(http://www.apache.org/dist/tomcat/tomcat-connectors/native/${pkgver}/source/${pkgname}-${pkgver}-src.tar.gz)
sha256sums=('7f78e71060dc029f9005490080babc45a2b702ea54263c440c52a9a7c02609e4')

build() {
  cd "${srcdir}/tomcat-native-${pkgver}-src/jni/native"

  ./configure \
    --prefix=/usr \
    --with-java-home=${JAVA_HOME} \
    --with-apr=/usr \
    --with-ssl=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}-src/jni/native"

  make DESTDIR=${pkgdir} install
}
